<extend name="Public/base"/>

<block name="body">
	<div class="main-title">
		<h2>{$main_title}</h2>
	</div>
	<div class="tab-wrap">
		<ul class="tab-nav nav">
			<li data-tab="tab1" class="current"><a href="javascript:void(0);">基 础</a></li>
			<!---<li data-tab="tab2"><a href="javascript:void(0);">高 级</a></li>-->
		</ul>
		<div class="tab-content">
			<form action="__SELF__" method="post" class="form-horizontal">
				<!-- 基础 -->
				<div id="tab1" class="tab-pane in tab1">
					<div class="form-item">
						<label class="item-label"><em class="must">*</em>请假类型<span class="check-tips"></span></label>
						<div class="controls">
							<select name="type"> 
								<option value="1">事假</option>
								<option value="2">病假</option>
							</select>
						</div>
					</div>
					<div class="form-item">
						<label class="item-label">
							<em class="must">*</em>请假原因<span class="check-tips">（缘由不能为空）</span>
						</label>
						<div class="controls">
							<textarea type="text" name="reason" rows="5" class="text input-large" value="{$info.reason|default=''}"></textarea>
						</div>
					</div>
				
					
				</div>
				<div class="form-item cf" sort="{$field['start_date']}">
					<label class="item-label">开始日期<span class="check-tips">（格式: yyyy-mm-dd hh:ii）</span></label>
					<div class="controls">
						<input id="start_date" type="text" class="text input-large" name="absence_time" value="{$info.absence_time}" />
					</div>
				</div>
				<div class="form-item cf" sort="{$field['end_date']}">
					<label class="item-label">结束日期<span class="check-tips">（格式: yyyy-mm-dd hh:ii）</span></label>
					<div class="controls">
						<input id="end_date" type="text" class="text input-large" name="attendence_time" value="{$info.attendence_time}" />
					</div>
				</div>
				

				<div class="form-item">
					<input type="hidden" name="id" value="{$info.id|default=''}">
					<button type="submit" id="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">确 定</button>
					<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</form>
		</div>
	</div>
</block>

<block name="script">

	<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
	<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
	<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
	<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
	<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
	<script type="text/javascript">
		Think.setValue("allow_publish", {$info.allow_publish|default=1});
		Think.setValue("check", {$info.check|default=0});
		Think.setValue("model[]", {$info.model|json_encode} || [1]);
		Think.setValue("type[]", {$info.type|json_encode} || [2]);
		Think.setValue("display", {$info.display|default=1});
		Think.setValue("reply", {$info.reply|default=0});
		Think.setValue("reply_model[]", {$info.reply_model|json_encode} || [1]);
		Think.setValue("reply_type[]", {$info.reply_type|json_encode} || [2]);
		$(function(){
			showTab();
			$("input[name=reply]").change(function(){
				var $reply = $(".form-item.reply");
				parseInt(this.value) ? $reply.show() : $reply.hide();
			}).filter(":checked").change();
			$('#start_date').datetimepicker({
				format: 'yyyy-mm-dd hh:ii',
				language:"zh-CN",
				minView:2,
				autoclose:true
			});
			$('#end_date').datetimepicker({
				format: 'yyyy-mm-dd hh:ii',
				language:"zh-CN",
				minView:2,
				autoclose:true
			});
		});
		//导航高亮
		$('.side-sub-menu').find('a[href="{:U('Category/index')}"]').closest('li').addClass('current');
		
	</script>
</block>
